package com.banmao.mall.mapper;

import com.banmao.mall.model.bo.admin.user.AddressListBO;
import com.banmao.mall.model.bo.client.address.AddressDetailBO;
import com.banmao.mall.model.pojo.Address;
import com.banmao.mall.model.vo.admin.user.AddressVO;
import com.banmao.mall.model.vo.client.address.AddressBaseVO;
import com.banmao.mall.model.vo.client.address.AddressDetailVO;
import com.banmao.mall.model.vo.client.address.RegionVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AddressMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Address record);

    int insertSelective(Address record);

    Address selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Address record);

    int updateByPrimaryKey(Address record);

    List<AddressVO> selectAddressByCondition(AddressListBO addressListBO);

    List<AddressBaseVO> selectAddrBaseByUserID(Integer userId);

    String selectWithRegion(@Param("id") Integer id,@Param("label") String label);

    AddressDetailVO selectDetailAddr(Integer addressId);

    int insertAddrDetail(AddressDetailBO addressDetailBO);

    int updateAllDefaultByUserID(Integer userId);

    int updateAddrByCondition(AddressDetailBO addressDetailBO);

    List<RegionVO> selectRegionListByPID(Integer pid);

    int updateWithDeleted(Integer addressId);

}